/**************************************************
 * FreeESP by compudaze (compudaze@gmail.com)
 * esp.h
 **************************************************/

#ifndef ESP_H
#define ESP_H

#include <windows.h>

/**************************************************
 * Signatures for finding new offsets:
 *
 * Chopper Box:			75 ?? 38 05 ?? ?? ?? ?? 74 ?? 56 E8 ?? ?? ?? ?? 83 C4 04 F6 05 ?? ?? ?? ?? 10 74 ?? 56 E8 ?? ?? ?? ?? 83 C4 04
 * Cold Blooded Fix:	75 6F 39 87 E0 00 00 00
 * Name Tag:			0F 85 F9 00 00 00 F7 05 ?? ?? 7F 00 00 18 00 00
 * Draw Through Walls:	74 06 B0 01 83 C4 5C
 **************************************************/

// Chopper Box Offsets
static DWORD dwChopperBox1			= 0x4B27F0;
static DWORD dwChopperBox2			= dwChopperBox1 + 0x8;
static DWORD dwChopperBox3			= dwChopperBox1 + 0x1A;
static DWORD dwColdBloodedFix		= 0x5A468E;

static BYTE bChopperBox1[2]			= {0x75, 0x23};
static BYTE bChopperBox2[2]			= {0x74, 0x09};
static BYTE bChopperBox3[2]			= {0x74, 0x09};
static BYTE bColdBloodedFix[2]		= {0x75, 0x6F};

// Name Tag Offsets
static DWORD dwNameTag1				= 0x5883A6;
static DWORD dwNameTag2				= dwNameTag1 + 0x27;
static DWORD dwNameTag3				= dwNameTag1 + 0x34;
static DWORD dwNameTag4				= dwNameTag1 + 0x3C;
static DWORD dwNameTag5				= dwNameTag1 + 0x56;
static DWORD dwDrawThroughWalls		= 0x58818C;

static BYTE bNameTag1[6]			= {0x0F, 0x85, 0xF9, 0x00, 0x00, 0x00};
static BYTE bNameTag2[6]			= {0x0F, 0x84, 0xD2, 0x00, 0x00, 0x00};
static BYTE bNameTag3[6]			= {0x0F, 0x84, 0xC5, 0x00, 0x00, 0x00};
static BYTE bNameTag4[6]			= {0x0F, 0x84, 0xBD, 0x00, 0x00, 0x00};
static BYTE bNameTag5[6]			= {0x0F, 0x85, 0xA3, 0x00, 0x00, 0x00};
static BYTE bDrawThroughWalls[2]	= {0x74, 0x06};

// Other
extern bool isEspEnabled;

void espEnable();
void espDisable();
void espToggle();

#endif  /* ESP_H */